<?php

use yii\helpers\Html;
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;
use common\components\helpers\Fun;
use zhtfrontend\modules\customermanage\components\services\Cmutil;

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <?= $this->renderFile('@app/views/layouts/toolbar.php'); ?>

    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check"
               data-tablesaw-mode="swipe" data-tablesaw-minimap>
            <thead>
            <tr class="yx-bgd2f6ec">
                <th><?= \Yii::t('zhtfrontend', 'ID'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '姓名'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '手机号码'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '意向分类'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '客户状态'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '负责人'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '当前约谈人'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '下次约谈人'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '跟进状态'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '下次回访时间'); ?></th>
            </tr>
            </thead>
                <?php if ($data): ?>
                    <?php foreach ($data as $item): ?>
                        <tr data-id="<?= $item['id'] ?>">
                            <td><?= $item['id'] ?></td>
                            <td><?= $item['name'] ?></td>
                            <td><?= $item['mobile'] ?></td>
                            <td><?= Cmutil::getCategory($item['category_id']) ?></td>
                            <td><?= Cmutil::getStatus($item['status']) ?></td>
                            <td><?= Cmutil::getAdmin($item['admin_id']) ?></td>
                            <td><?= Cmutil::getAdmin($item['interviewer_id']) ?></td>
                            <td><?= Cmutil::getAdmin($item['next_interviewer_id']) ?></td>
                            <td><?= Cmutil::getFollowStatus($item['follow_status']) ?></td>
                            <td><?= \Yii::$app->formatter->asDate($item['next_time'],'yyyy-MM-dd h:i:s') ?></td>
                        </tr>
                    <?php endforeach; ?>
                <?php endif; ?>
        </table>
        <!--<div style="text-align: right"><?/*= \yii\widgets\LinkPager::widget(['pagination' => $pages]) */?></div>-->
    </div>
</div>


